//
//  CGNoticeCell.m
//  SchoolClient
//
//  Created by mac on 15/11/5.
//  Copyright © 2015年 mac. All rights reserved.
//

#import "CGNoticeCell.h"

@implementation CGNoticeCell

@synthesize titleLabel,timeLabel,addressLabel,circleImage;

-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        //招聘标题
        CGRect aFrame = CGRectMake(40, 15, SCREEN_WIDTH - 50, 24);
        titleLabel = [[UILabel alloc]initWithFrame:aFrame];
        titleLabel.text = @"春季校园人才招聘会";
        titleLabel.font = [UIFont systemFontOfSize:16];
        [self.contentView addSubview:titleLabel];
        
        //招聘时间
        aFrame.origin.y += 24;
        timeLabel = [[UILabel alloc]initWithFrame:aFrame];
        timeLabel.text = @"2016年3月12日 上午9:00";
        timeLabel.font = [UIFont systemFontOfSize:15];
        timeLabel.textColor = [UIColor darkGrayColor];
        [self.contentView addSubview:timeLabel];
        
        //招聘地址
        aFrame.origin.y += 24;
        addressLabel = [[UILabel alloc]initWithFrame:aFrame];
        addressLabel.text = @"广西大学音乐管理学院舞蹈厅";
        addressLabel.font = [UIFont systemFontOfSize:15];
        addressLabel.textColor = [UIColor darkGrayColor];
        [self.contentView addSubview:addressLabel];
        
        //在前面添加一圆圈
        CGRect bFrame = CGRectMake(10, 40, 20, 20);
        circleImage = [[UIImageView alloc]initWithFrame:bFrame];
        circleImage.image = [UIImage imageNamed:@"mine_not_check_icon"];
        circleImage.hidden = YES;
        [self.contentView addSubview:circleImage];
        
    }
    return self;
}


-(void)setNotice:(CGNotice *)notice{
    
    _notice = notice;
    titleLabel.text = notice.title;
    timeLabel.text = notice.time;
    addressLabel.text = notice.content;

}


@end
